function [] = display_chains( swap_idx, cfg, beta, relative_step_size, step_acceptance, swap_acceptance, energy_chain )
% display chain info
if (swap_idx > 0)
    for chain_idx = 1:cfg.nchains
        fprintf(1,'  chain %d: T=%-6.4f relstep=%-8.3g accept=%-8.3g minE=%-8.3g currE=%-8.3g\n', ...
            chain_idx, ...
            1/beta(chain_idx), ...
            relative_step_size(chain_idx), ...
            sum(step_acceptance(chain_idx,1:swap_idx))/(cfg.nsteps*swap_idx), ...
            min(energy_chain(chain_idx,1:swap_idx+1)), ...
            energy_chain(chain_idx,swap_idx+1) );
    end
    fprintf(1,'  swapping rates :\n' );
    for chain_idx = 1:cfg.nchains-1
        fprintf(1,'    %d <-> %d = %-8.3f\n', ...
            chain_idx, chain_idx+1, ...
            sum(swap_acceptance(chain_idx,:))/swap_idx );
    end
else
    for chain_idx = 1:cfg.nchains
        fprintf(1,'  chain %d: T=%-6.4f relstep=%-8.3g currE=%-8.3g\n', ...
            chain_idx, ...
            1/beta(chain_idx), ...
            relative_step_size(chain_idx), ...
            energy_chain(chain_idx,swap_idx+1) );
    end

end
